cmake_minimum_required(VERSION 3.0)

#### mpp ####
set(MPP_INCLUDE_DIR
    # "/usr/include/rockchip/"
    # "/home/firefly/Desktop/spk_camera/external/mpp/mpp-release_20171218/inc"
    # "/home/firefly/Desktop/spk_camera/external/mpp/mpp-lhj/inc"
    "/home/firefly/Desktop/spk_camera/external/mpp/mpp-1.0.5/inc"
)
set(MPP_LIB_PATH
    # "/usr/lib/aarch64-linux-gnu/"
    # "/home/firefly/Desktop/spk_camera/external/mpp/mpp-release_20171218/build/linux/aarch64/mpp"
    # "/home/firefly/Desktop/spk_camera/external/mpp/mpp-lhj/lib"
    "/home/firefly/Desktop/spk_camera/external/mpp/mpp-1.0.5/build/linux/aarch64/mpp"
)

set(MPP_LIBS
    "${MPP_LIB_PATH}/librockchip_mpp.so.0"
    # "${MPP_LIB_PATH}/librockchip_mpp.so"
)
message(STATUS "MPP Libraries: ${MPP_LIBS}")

add_library(mpp INTERFACE)
target_link_libraries(mpp INTERFACE ${MPP_LIBS})
target_include_directories(mpp INTERFACE ${MPP_INCLUDE_DIR})
# target_link_directories(mpp INTERFACE ${MPP_LIB_PATH})

##### ffmpeg #####
set(FFMPEG_INCLUDE_DIR
    "/usr/local/include"
)
set(FFMPEG_LIB_PATH
    "/usr/local/lib"
)
set(FFMPEG_LIBS
    "${FFMPEG_LIB_PATH}/libavdevice.a"
    "${FFMPEG_LIB_PATH}/libavfilter.a"
    "${FFMPEG_LIB_PATH}/libavformat.a"
    "${FFMPEG_LIB_PATH}/libavcodec.a"
    "${FFMPEG_LIB_PATH}/libavutil.a"
    "${FFMPEG_LIB_PATH}/libswscale.a"
    "${FFMPEG_LIB_PATH}/libswresample.a"
    pthread
    z
    asound
)

add_library(ffmpeg INTERFACE)
target_link_libraries(ffmpeg INTERFACE ${FFMPEG_LIBS})
target_include_directories(ffmpeg INTERFACE ${FFMPEG_INCLUDE_DIR})
# target_link_directories(ffmpeg INTERFACE ${FFMPEG_LIB_PATH})

#### sip ####
set(SIP_INCLUDE_DIR
    "/usr/local/include"
)
set(SIP_LIB_PATH
    "/usr/local/lib"
)
set(SIP_LIBS
    # "${SIP_LIB_PATH}/libosip2.so"
    # "${SIP_LIB_PATH}/libosipparser2.so"
    # "${SIP_LIB_PATH}/libeXosip2.so"
    osip2
    osipparser2
    eXosip2
)

add_library(sip INTERFACE)
target_link_libraries(sip INTERFACE ${SIP_LIBS})
target_include_directories(sip INTERFACE ${SIP_INCLUDE_DIR})

